<?php

namespace app\assets;

use yii\web\AssetBundle;

class UserAdminAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public function registerAssetFiles($view){
        $this->css = [
            'home/user/css/amazeui.min.css',
            'home/user/css/admin.css',
            'home/user/css/app.css',
        ];
        $this->js = [
            //'home/user/js/jquery.min.js',
            'home/user/js/amazeui.min.js',
            'home/user/js/iscroll.js',
            'home/user/js/app.js',
            'home/user/js/echarts.min.js',
        ];
        parent::registerAssetFiles($view);
    }

    //按需加载js
    public static function addJs($view, $jsfile) {
        $view->registerJsFile($jsfile, [AppAsset::className(), 'depends' => 'app\assets\AppAsset']);
    }
}
